package com.spboot.app.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jntoo.db.DB;
import java.io.Serializable;
import java.util.*;

@TableName("dingdanjiaoyi")
public class Dingdanjiaoyi implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer shangpindingdanid;

    private String dingdanhao;

    private Integer zongjia;

    private String shangjia;

    private String goumairenxingming;

    private String goumairen;

    private String wenjian;

    private String tupian;

    private String beizhu;

    private String zhuangtai;

    private String addtime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getDingdanwanchengCount() {
        return DB.name("dingdanwancheng").where("dingdanjiaoyiid", id).count();
    }

    public Integer getShangpindingdanid() {
        return shangpindingdanid;
    }

    public void setShangpindingdanid(Integer shangpindingdanid) {
        this.shangpindingdanid = shangpindingdanid == null ? 0 : shangpindingdanid;
    }

    public String getDingdanhao() {
        return dingdanhao;
    }

    public void setDingdanhao(String dingdanhao) {
        this.dingdanhao = dingdanhao == null ? "" : dingdanhao.trim();
    }

    public List<Dingdanjiaoyidingdanshangpin> getDingdanshangpinList() {
        return DB.name(Dingdanjiaoyidingdanshangpin.class).where("dingdanjiaoyiid", id).order("id asc").select();
    }

    public Integer getZongjia() {
        return zongjia;
    }

    public void setZongjia(Integer zongjia) {
        this.zongjia = zongjia == null ? 0 : zongjia;
    }

    public String getShangjia() {
        return shangjia;
    }

    public void setShangjia(String shangjia) {
        this.shangjia = shangjia == null ? "" : shangjia.trim();
    }

    public String getGoumairenxingming() {
        return goumairenxingming;
    }

    public void setGoumairenxingming(String goumairenxingming) {
        this.goumairenxingming = goumairenxingming == null ? "" : goumairenxingming.trim();
    }

    public String getGoumairen() {
        return goumairen;
    }

    public void setGoumairen(String goumairen) {
        this.goumairen = goumairen == null ? "" : goumairen.trim();
    }

    public String getWenjian() {
        return wenjian;
    }

    public void setWenjian(String wenjian) {
        this.wenjian = wenjian == null ? "" : wenjian.trim();
    }

    public String getTupian() {
        return tupian;
    }

    public void setTupian(String tupian) {
        this.tupian = tupian == null ? "" : tupian.trim();
    }

    public String getBeizhu() {
        return beizhu;
    }

    public void setBeizhu(String beizhu) {
        this.beizhu = beizhu == null ? "" : beizhu.trim();
    }

    public String getZhuangtai() {
        return zhuangtai;
    }

    public void setZhuangtai(String zhuangtai) {
        this.zhuangtai = zhuangtai == null ? "" : zhuangtai.trim();
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime == null ? "" : addtime.trim();
    }
}
